home *** CD-ROM | disk | FTP | other *** search
- { Common Unit. Contains several routines which are used by several of}
- {the othe units. }
- {Written 7 January 1987 Owen Hartnett, Ωhm Software Co.}
-
- UNIT common;
-
- INTERFACE
-
- USES
- multiSkelGlobs;
-
-
- PROCEDURE DrawGrowBox (wind : WindowPtr);
- PROCEDURE SetWindClip (wind : WindowPtr);
- PROCEDURE ResetWindClip;
-
- IMPLEMENTATION
-
- VAR
- oldClip : RgnHandle;
-
- { Miscellaneous routines}
- { These take care of drawing the grow box and the line along}
- { the right edge of the window, and of setting and resetting the clip}
- { region to disallow drawing in that right edge by the other drawing}
- { routines.}
-
- PROCEDURE DrawGrowBox;
-
- VAR
- r : Rect;
- oldClip : RgnHandle;
-
- BEGIN
- r := wind^.portRect;
- r.left := r.right - 15; { draw only along right edge }
- oldClip := NewRgn;
- GetClip(oldClip);
- ClipRect(r);
- DrawGrowIcon(wind);
- SetClip(oldClip);
- DisposeRgn(oldClip);
- END;
-
- PROCEDURE SetWindClip;
-
- VAR
- r : Rect;
-
- BEGIN
- r := wind^.portRect;
- r.right := r.right - 15; { don't draw along right edge }
- oldClip := NewRgn;
- GetClip(oldClip);
- ClipRect(r);
- END;
-
- PROCEDURE ResetWindClip;
-
- BEGIN
- SetClip(oldClip);
- DisposeRgn(oldClip);
- END;
- END.